Towards Modular Interpretive Decompilation of Low-Level Code to Prolog
نویسندگان
چکیده
Decompiling low-level code to a high-level intermediate representation facilitates the development of analyzers, model checkers, etc. which reason about properties of the low-level code (e.g., bytecode, .NET). Interpretive decompilation consists in partially evaluating an interpreter for the low-level language (written in the high-level language) w.r.t. the code to be decompiled. There have been proofs-of-concept that interpretive decompilation is feasible, but there remain open issues when it comes to decompile a real language: does the approach scale up? is the quality of decompiled programs comparable to that obtained by ad-hoc decompilers? do decompiled programs preserve the structure of the original programs? This paper addresses these issues by presenting, to the best of our knowledge, the first modular scheme to enable interpretive decompilation of low-level code to a high-level representation. The proposed scheme ensures that: 1) each method/block is decompiled just once, and 2) each program point is traversed at most once during decompilation.
منابع مشابه
Decompilation of Java bytecode to Prolog by partial evaluation
Reasoning about Java bytecode (JBC) is complicated due to its unstructured control-flow, the use of three-address code combined with the use of an operand stack, etc. Therefore, many static analyzers and model checkers for JBC first convert the code into a higher-level representation. In contrast to traditional decompilation, such representation is often not Java source, but rather some interme...
متن کاملModular CompilerArchitecture for aData Manipulation
We describe a modular compiler architecture that has been developed over the years for a functional data model DBMS. This has proved itself in practice, when major extensions have been developed quickly by reuse of modules (possibly reordered) saving much development time. We analyse the reasons for success and discuss the intermediate code (ICode) format used to communicate between modules. Th...
متن کاملAnalysis of Low-Level Code Using Cooperating Decompilers
Analysis or verification of low-level code is useful for minimizing the disconnect between what is verified and what is actually executed and is necessary when source code is unavailable or is, say, intermingled with inline assembly. We present a modular framework for building pipelines of cooperating decompilers that gradually lift the level of the language to something appropriate for source-...
متن کاملAdvanced Static Analysis for Decompilation Using Scattered Context Grammars
Reverse program compilation (i.e. decompilation) is a process heavily exploited in reverse engineering. The task of decompilation is to transform a platform-specific executable into a high-level language representation, which is usually the C language. Such a process can be used for source code reconstruction, compiler testing, malware analysis, etc. In present, there are several existing decom...
متن کاملPreprocessing of Binary Executable Files Towards Retargetable Decompilation
The goal of retargetable machine-code decompilation is to analyze and reversely translate platform-dependent executable files into a high level language (HLL) representation. This process can be used for many different purposes, such as legacy code reengineering, malware analysis, etc. Retargetable decompilation is a complex task that must deal with a lot of different platform-specific features...
متن کامل